﻿using System;
using Framework.Resource;
using UnityEngine;

namespace Framework
{

    public class UnityGameEntry : MonoBehaviour
    {
        // public static ResourceManager Resource { get; private set; }
        // public static EntityManager Entity { get; private set; }
        // public static SceneManager Scene { get; private set; }
        // public static ObjectPool ObjectPool { get; private set; }

        
        
        
        public virtual void Update()
        {
            GameEntry.Update(Time.deltaTime,Time.unscaledDeltaTime);
        }

        public static void Shutdown()
        {
#if UNITY_EDITOR
            UnityEditor.EditorApplication.isPlaying = false;
#else
Application.Quit();
#endif
            Application.Quit();
        }
        public void OnDestroy()
        {
            GameEntry.Shutdown();
        }
    }

}